<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:url('Advert/index')}" method="post">
        <input type="hidden" name="pageSize" value="{$pageSize}">
        <input type="hidden" name="pageCurrent" value="{$pageCurrent}">
        <input type="hidden" name="orderField" value="{$orderField}">
        <input type="hidden" name="orderDirection" value="{$orderDirection}">
        <div class="bjui-searchBar">
            <label>AID：</label><input type="text" value="{$keys.aid|default=''}" name="keys[aid]" class="form-control" size="8">&nbsp;
            <label>推广名称：</label><input type="text" value="{$keys.xname|default=''}" name="keys[xname]" class="form-control" size="12">&nbsp;
            <label>二级目录：</label><input type="text" value="{$keys.tname|default=''}" name="keys[tname]" class="form-control" size="10">&nbsp;
            <label>推广域名：</label><input type="text" value="{$keys.did|default=''}" name="keys[did]" class="form-control" size="15">&nbsp;
            <label>员工名称:</label>
            <select name="keys[mid]" data-toggle="selectpicker" data-size="10" data-width="80">
                <option value="">全部</option>
                {volist name="memArr" id="mem"}
                <option value="{$mem.mid}" {eq name="$mem.mid" value="$keys.mid|default=''"}selected{/eq}>{$mem.nickname}</option>
                {/volist}
            </select>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            {if authcheck('Admin/Advert/add')}
            <a class="btn btn-default" href="{:url('Advert/add')}" data-id="add_Advert" data-toggle="navtab" data-reload-warn="" data-icon="plus" data-title="新增计划">新增</a>
            {/if}
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">复选框-批量操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        {if authcheck('Admin/Advert/del')}
                            <li><a href="{:url('Advert/del')}" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-reload="false" data-idname="delids" data-group="ids">批量删除选中</a></li>
                        {/if}
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
            <tr>
            {volist name="thead" id="val"}
                <th {neq name="$key" value="group"}data-order-field="{$key}"{/neq}>{$val}</th>
            {/volist}
                <th width="26"><i title="页面统计" class="fa fa-bar-chart"></i></th>
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th width="170">操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="row"}
            <tr data-id="{$row.aid}">
                {volist name="thead" id="val"}
                <td style="{eq name='$key' value='url'}word-wrap:break-word;word-break:break-all;{/eq}{eq name='$row.tname' value='$keys.tname|default=""'}color:#f00;{/eq}">
                    {$row[$key]}
                </td>
                {/volist}
                <td>{$row.ismo}</td>
                <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$row.aid}"></td>
                <td>
                    <a style="margin:2px;" href="{$row.url}" class="btn btn-blue" target="_blank" title="打开页面" {eq name="$row.url" value=""}disabled{/eq}>预览</a>
                    {if authcheck('Admin/Advert/edit')}
                        <a style="margin:2px;" href="{:url('Advert/edit',['key'=>'aid','val'=>$row['aid']])}" class="btn btn-green" data-toggle="navtab" data-id="edit_Advert" data-title="修改计划">修改</a>
                    {/if}
                    <!--<a style="margin:2px;" href="{$row.test_url}" class="btn btn-blue" target="_blank" title="打开测试页面,域名过期或失效时用">测试</a>-->
                    {if authcheck('Admin/Advert/del')}
                        <a style="margin:2px;" href="{:url('Advert/del',['key'=>'aid','val'=>$row['aid']])}" class="btn btn-red" data-reload="false" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删除</a>
                    {/if}
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-width="50" data-toggle-change="changepagesize">
                <option value="20">20</option>
                <option value="40">40</option>
                <option value="60">60</option>
            </select>
        </div>
        <span>&nbsp;条，共 {$totalCount} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="20" data-page-current="{$pageCurrent}">
    </div>
</div>